<?php
class Controller{
	public function __construct() {
		$_REQUEST = $this -> _addslashes($_REQUEST);
	}
	
	public function _addslashes($arr) {
		foreach($arr as $k=>$v) {
			if(is_string($v)) {
				$arr[$k] = addslashes(trim($v));
			} else if(is_array($v)) {
				$arr[$k] = $this -> _addslashes($v);
			}
		}
		return $arr;
	}
	
	public function jump($url, $message='', $wait=3) {
		if($wait == 0) {
			header("location:{$url}");
		} else {
			include __VIEW__ . 'Public' . DS . 'message.html';
		}
		exit();
	}
}
?>